<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.shsh.safemanage.action.ActionCreator"%>
<%@page import="com.shsh.safemanage.action.AdminAction"%>
<%@page import="com.shsh.safemanage.util.Constants"%>
<%@page import="com.shsh.safemanage.model.Admin"%>
<%@page import="com.shsh.safemanage.dao.*"%>
<%@page import="com.shsh.safemanage.model.*"%>
<%@page import="java.util.*"%>


<%
{
Admin loginAdmin = (Admin) session.getAttribute(Constants.SESSION_ADMIN_USER);
%>
<div class="nav1"><a href="javascript:" class="h">菜单</a></div>
<div class="nav2" style="padding: 0 0 0 2px; display: block">
	<div class="nav3" style="padding: 0; display: block">
		<div class="nav4" style="padding: 0; display: block">
		<%
		if (loginAdmin == null) {
			%>
			<div class="nav5" style="padding: 0 0 0 3px">
			<a href="javascript:" onclick="loadPageSection('<%=request.getContextPath()%>/admin/login.jsp', 'mainContentDiv')">管理员登录</a>
			</div>	
			<%		
		}
		%>
		<%
		if (loginAdmin != null) {
			 PostCheckDao postCheckDao = DaoCreator.createPostCheckDao();
			 List<PostCheck> postcheckList= postCheckDao.getPostCheckList();
			 long firstPostcheckID = postcheckList.size()==0?0l:postcheckList.get(0).getId();
			 List<PostcheckPattern> postcheckPatternList=postCheckDao.getPostcheckPatternByPostcheckID(firstPostcheckID);
			 long firstPostcheckPatternID = postcheckPatternList.size()==0?0l:postcheckPatternList.get(0).getId();
			 List<PostcheckContent> postcheckContentList=postCheckDao.getPostcheckContentByPostcheckPatternID(firstPostcheckPatternID);		 
			 long firstPostcheckContentID = postcheckContentList.size()==0?0l:postcheckContentList.get(0).getId();
		%>
			<div class="nav5" style="padding: 0 0 0 3px">
			<a href="javascript:" onclick="loadPageSection('<%=request.getContextPath()%>/admin/employee_list.jsp', 'mainContentDiv', {}, true)">已注册员工列表</a>
			</div>
			<div class="nav5" style="padding: 0 0 0 3px">
			<a href="javascript:" onclick="loadPageSection('<%=request.getContextPath()%>/admin/open_register.jsp', 'mainContentDiv', {}, true)">开放员工重新注册</a>
			</div>
			<div class="nav5" style="padding: 0 0 0 3px">
			<a href="javascript:" onclick="loadPageSection('<%=request.getContextPath()%>/admin/department3_role.jsp', 'mainContentDiv', {}, true)">职位角色管理</a>
			</div>
			<div class="nav5" style="padding: 0 0 0 3px">
			<a href="javascript:" onclick="loadPageSection('<%=request.getContextPath()%>/admin/jobpost_role.jsp', 'mainContentDiv', {}, true)">职务（岗位）角色管理</a>
			</div>
			<div class="nav5" style="padding: 0 0 0 3px">
			<a href="javascript:" onclick="loadPageSection('<%=request.getContextPath()%>/admin/problem_browse.jsp', 'mainContentDiv', {}, true)">问题管理</a>	
			</div>
			<div class="nav5" style="padding: 0 0 0 3px">
			<a href="javascript:" onclick="loadPageSection('<%=request.getContextPath()%>/admin/postcheck.jsp', 'mainContentDiv', {postcheckID: <%=firstPostcheckID %>, postcheckPatternID: <%=firstPostcheckPatternID %>, postcheckContentID: <%=firstPostcheckContentID %>}, true)">岗检标准管理</a>
			</div>
			<div class="nav5" style="padding: 0 0 0 3px">
			<a href="javascript:" onclick="loadPageSection('<%=request.getContextPath()%>/admin/department1_postcheck.jsp', 'mainContentDiv', {postcheckID: <%=firstPostcheckID %>}, true)">岗检部门关系管理</a>
			</div>
		<%
		}
		%>
		</div>
	</div>
</div>
<%
}
%>